<include file="Public:header" />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="17" valign="top" background="__PUBLIC__/images/mail_leftbg.gif"><img src="__PUBLIC__/images/left-top-right.gif" width="17" height="29" /></td>
		<td valign="top" background="__PUBLIC__/images/content-bg.gif">
			<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
				<tr>
					<td height="31"><div class="titlebt">新增优惠</div></td>
				</tr>
			</table>
		</td>
		<td width="16" valign="top" background="__PUBLIC__/images/mail_rightbg.gif"><img src="__PUBLIC__/images/nav-right-bg.gif" width="16" height="29" /></td>
	</tr>
	<tr>
		<td valign="middle" background="__PUBLIC__/images/mail_leftbg.gif">&nbsp;</td>
		<td valign="top" bgcolor="#F7F8F9">
			<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<!--内容区域s-->
					<td>
						<script language="JavaScript">
						<!--
							function getWebsiteName(){
								ThinkAjax.send('__URL__/getWebsiteName/','ajax=1&siteid='+$F('siteid'));
							}
						//-->
						</script>
						<div class="content">
							<div class="title">新增优惠 [ <a href="__URL__">返回列表</a> ]</div>
							<table cellpadding=3 cellspacing=3>
								<form method='post' id="form1" action="__URL__/insert/" enctype="multipart/form-data">
								<tr>
									<td class="tRight" >优惠名称：</td>
									<td class="tLeft" ><input type="text" class="medium bLeftRequire" id="title" name="title"></td>
								</tr>
								<tr>
									<td class="tRight" >所属分类：</td>
									<td class="tLeft" >
										<SELECT class="bLeft"  name="cid">
											<option value="0">顶级分类</option>
											<volist name="YouhuiClass" id="vo_YouhuiClass">
											<option value="{$vo_YouhuiClass.id}">{$vo_YouhuiClass.title}</option>
											</volist>
										</SELECT>
									</td>
								</tr>
								<tr>
									<td class="tRight" >所属网站ID：</td>
									<td class="tLeft" >
										<input type="text" class="medium bLeftRequire" id="siteid" name="siteid" value="{$Think.get.siteid}">
										<input type="button" value="查询网站名" onclick="getWebsiteName()" class="submit hMargin">
										如果id有修改，请点击“查询网站名”，确认对应店铺名是否正确
									</td>
								</tr>
								<notempty name="Think.get.siteid">
								<tr>
									<td class="tRight" >所属网站名称：</td>
									<td class="tLeft" >
										{$Think.get.siteid|getWebsiteName}
									</td>
								</tr>
								</notempty>
								<tr>
									<td class="tRight" >图片：</td>
									<td class="tLeft" >
									<input name="img" id = "img" type="file" >
									</td>
								</tr>
								<tr>
									<td class="tRight" >价格：</td>
									<td class="tLeft" >
										<input type="text" class="medium bLeftRequire" id="price" name="price">
									</td>
								</tr>
								<tr>
									<td class="tRight" >开始时间：</td>
									<td class="tLeft" >
										<input type="text" class="medium bLeftRequire" id="stime" name="stime" readonly>
										<img src="__PUBLIC__/images/calendar/time.gif" border="0" onclick="getDatePicker('stime', event, 21)"  />
									</td>
								</tr>
								<tr>
									<td class="tRight" >结束时间：</td>
									<td class="tLeft" >
										<input type="text" class="medium bLeftRequire" id="etime" name="etime">
										<img src="__PUBLIC__/images/calendar/time.gif" border="0" onclick="getDatePicker('etime', event, 21)"  />
									</td>
		
								</tr>
								<tr>
									<td class="tRight" >购买链接：</td>
									<td class="tLeft" >
										<input type="text" class="huge bLeftRequire"  name="link"> 请以http://开头
									</td>
								</tr>
								<tr>
									<td class="tRight" >优惠简介：</td>
									<td class="tLeft" >
										<textarea class="bLeft" rows="15" cols="70" name="message"></textarea>
									</td>
								</tr>
								<tr>
									<td class="tRight" >keywords：</td>
									<td class="tLeft" ><input type="text" class="medium bLeft" name="seokeywords" value=""></td>
								</tr>
								<tr>
									<td class="tRight" >description：</td>
									<td class="tLeft" ><input type="text" class="medium bLeft" name="seodescription" value=""></td>
								</tr>
								<tr>
									<td class="tRight">点击</td>
									<td class="tLeft">
										<input type="text" class="small bLeftRequire" name="apv" />
									</td>
								</tr>
								<tr>
									<td class="tRight" >状态：</td>
									<td class="tLeft" >
										<SELECT class="bLeft"  name="status">
											<option value="1">启用</option>
											<option value="0">禁用</option>
										</SELECT>
									</td>
								</tr>
                                                                <tr>
									<td class="tRight" >作者id：</td>
									<td class="tLeft" >
										<input type="text" class="medium bLeftRequire" id="authorid" name="authorid" value="{$_SESSION[C('USER_AUTH_KEY')]}">
									</td>
								</tr>
								<tr>
									<td class="tRight" >作者：</td>
									<td class="tLeft" >
										<input type="text" class="medium bLeftRequire" id="author" name="author" value="{$_SESSION[C('USER_AUTH_KEY')]|getAdminName}">
									</td>
								</tr>
								<tr>
									<td></td>
									<td class="center">
									<input type="submit" value="保 存" class="small submit">
									<input type="reset" class="submit  small" value="清 空" >
									</td>
								</tr>
								</form>
							</table>
						</div>
					</td>
					<!--内容区域e-->
				</tr>
			</table>
		</td>
		<td background="__PUBLIC__/images/mail_rightbg.gif">&nbsp;</td>
	</tr>
	<tr>
		<td valign="bottom" background="__PUBLIC__/images/mail_leftbg.gif"><img src="__PUBLIC__/images/buttom_left2.gif" width="17" height="17" /></td>
		<td background="__PUBLIC__/images/buttom_bgs.gif"><img src="__PUBLIC__/images/buttom_bgs.gif" width="17" height="17"></td>
		<td valign="bottom" background="__PUBLIC__/images/mail_rightbg.gif"><img src="__PUBLIC__/images/buttom_right2.gif" width="16" height="17" /></td>
	</tr>
</table>
<include file="Public:footer" />
